{% extends "app/base_manage.html" %}
{% load i18n %}

{% autoescape off %}
{% block html_head_ext %}
<link rel="stylesheet" type="text/css" 
      href="{{ base_site_url }}/dms_media/javascript/yui/build/fonts/fonts-min.css" />
<link rel="stylesheet" type="text/css" 
      href="{{ base_site_url }}/dms_media/javascript/yui/build/tabview/assets/skins/sam/tabview.css" />
{% if ajax %}
<link rel="stylesheet" type="text/css" href="{{ base_site_url }}/dms_media/javascript/yui/build/autocomplete/assets/skins/sam/autocomplete.css" />
<script type="text/javascript" src="{{ base_site_url }}/dms_media/javascript/yui/build/utilities/utilities.js"></script>
<script type="text/javascript" src="{{ base_site_url }}/dms_media/javascript/yui/build/autocomplete/autocomplete.js"></script>
{% endif %}
<script type="text/javascript" 
      src="{{ base_site_url }}/dms_media/javascript/yui/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<script type="text/javascript" 
      src="{{ base_site_url }}/dms_media/javascript/yui/build/element/element-beta.js"></script>
<script type="text/javascript" 
      src="{{ base_site_url }}/dms_media/javascript/yui/build/tabview/tabview.js"></script>
<style>
.yui-content { background-color: #f4f4f4 !important; }
</style>

<script type="text/javascript">
function showHelp(url) {
  width = 500
  left  = screen.width - width;
  param = "top=0,menubar=yes,scrollbars=yes"
  winHelp = window.open(url,
            "_help",
            "width="+String(width)+",height=600,left="+String(left)+","+param);
  winHelp.focus();
}
</script>

<script type="text/javascript" src="{{ site.url }}/dms_media/javascript/calendar/calendar.js"></script>
<script type="text/javascript" src="{{ site.url }}/dms_media/javascript/overlib/overlib.js-small"></script>
<script type="text/javascript" src="{{ site.url }}/dms_media/javascript/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
  language : "de",
  convert_urls : false,
  relative_urls : false,
  mode : "exact",
  elements : "ta,ta1,ta2,ta3,ta4,ta5,ta6,ta7,ta8,ta9,ta10",
  theme : "advanced",
  plugins : "safari,table,advimage,advlink,media,searchreplace,paste,fullscreen,nonbreaking",
  theme_advanced_buttons1 : "bold,italic,underline,separator,undo,redo,separator,justifyleft,justifycenter,justifyright,separator,bullist,numlist,separator,hr,sub,sup,nonbreaking,charmap,formatselect,separator,link,unlink,image,media",
  theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator,tablecontrols,separator,cleanup,separator,fullscreen,code,help",
  theme_advanced_buttons3 : "",
  theme_advanced_toolbar_location : "top",
  theme_advanced_toolbar_align : "left",
  theme_advanced_resize_horizontal : false,
  theme_advanced_resizing : true,
  nonbreaking_force_tab : true,
  apply_source_formatting : true,
  button_tile_map : true
});
/*  
  plugins : "safari,table,advhr,advimage,advlink,inlinepopups,media,searchreplace,contextmenu,paste,fullscreen,noneditable,nonbreaking,xhtmlxtras",
  plugins : "table,preview,searchreplace,paste,media,fullscreen",

  theme_advanced_buttons1 : "bold,italic,underline,separator,undo,redo,separator,justifyleft,justifycenter,justifyright,separator,bullist,numlist,separator,hr,sub,sup,charmap,formatselect,separator,link,unlink,image,media,separator,fullscreen,separator,template,code,help",
  theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator,tablecontrols,separator,cleanup",

  theme_advanced_buttons3 : "",

extended_valid_elements :   

extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],br[clear],span[class|align|style],object[classid|codebase|width|height],param[name|value],embed[quality|type|pluginspage|width|height|src]",

"span[class|align|style],br[clear],img[src|usemap|alt],map[],area[],object[classid|codebase|width|height],param[name|value],embed[quality|type|pluginspage|width|height|src]",
*/
</script>
{% endblock %}

{% if not show_frame_left %}
{% block frame_left %}
  {% if site.left_image_url %}
  <div id="layer_menu_image">
    <img src="{{ site.left_image_url }}"
        width="{{ site.left_image_width }}" height="{{ site.left_image_height }}" 
        alt="{% trans "Schmuckbild" %}" />
  </div>
  {% endif %}
  <div  id="layer_menu_links">
    {{ navigation_left }}
    {{ site.navigation_bottom_image }}
  </div>
{% endblock %}
{% endif %}

{% block title %}{{ title }}{% endblock %}
{% block sub_title %}
  {% if sub_title %}
    {{ sub_title }}{% if my_name %} <i>[{{ my_name }}]</i>{% endif %}
  {% endif %}
{% endblock %}

{% block content %}

{% if text_intro %}
  {{ text_intro }}
{% endif %}

{% if errors %}
  {% if show_errors %}
    {% blocktrans %}<p>
    <b><span class="red">Ihre Eingaben wurden <i>nicht</i> gespeichert, da Sie
    nicht fehlerfrei sind.</span></b>
    Bitte korrigieren Sie die Fehler und versuchen Sie es anschließend noch einmal.
    </p>
    {% endblocktrans %}
  {% endif %}
{% endif %}

{% if submit %}
{% if top_of_form %}
{{ top_of_form }}
{% endif %}
<form method = "post"
      name   = "form_input"
{% if is_file_form %}
      enctype  = "multipart/form-data"
{% endif %}
      action = "{{ next }}">
{{ content }}
<p align="right" style="margin-top:0.5em;">
<input name="path" type="hidden" value="{{ path }}" />
<input name="submit" type="submit" value="{{ submit }} ..." />
</p>
</form>
{% else %}
{{ content }}
{% endif %}

<script>
 var editTab = new YAHOO.widget.TabView('editForm');
</script>
{{ ajax }}
{% endblock %}
{% endautoescape %}
